import cache

class Allignments(object):
    def __init__(self, file, language):
        self.language = language
        self.allignments = []
        self.load_allignments(file)

    def load_allignments(self, file):
        f = open(file)
        sentences = f.readlines()
        for word_allignments in sentences:
            word_allignments = word_allignments.replace('\n', '').split(' ')
            word_allignments = [a.replace('-', ' ').split(' ') for a in word_allignments]
            word_allignment = [[int(a[0]), int(a[1])] for a in word_allignments]
            self.allignments.append(word_allignments)        
        f.close()
